package view;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import resource.manager.ResourceManager;


public class MenuBar extends JMenuBar{
	String[] myMenus;
	public MenuBar(){
		super();
		establishMenu();
		addMenusToMenuBar();
	}
	
	private void establishMenu(){
		ResourceManager resources = ResourceManager.getInstance();
		resources.addResourcesFromFile("view");
		myMenus = resources.getStringArray("menus");
	}
	private void addMenusToMenuBar(){
		for(String s: myMenus){
			this.add(new JMenu(s));
		}
	}
}
